<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/struts-bean" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/tld/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-logic" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/jstl/c" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/jstl/fn" prefix="fn" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
  <head>
    <html:base />
    
    <title>自动播放新闻管理</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
.vb_wid {width:100%; margin: 0 auto; border-top:1px #FDB18D solid; background:#F5F5F5; color:#FE6500; text-indent:20px; line-height:25px; font-size:12px;}
.fb_search {width:100%; margin:0 auto; margin-top:20px; border:1px #FFCD7F solid;}
.fb_search h1 {background:#FFEFBB; margin:0px; padding:0px; line-height:28px; text-indent:10px; font-size:14px;}
.fb_s_a1 {margin:5px; font-size:14px;}
.fb_s_a2 {font-size:12px; line-height:22px; color:#999; margin-left:5px;}
.fb_ddd {width:100%; margin:0 auto; margin-top:10px; border-top:3px #FFCC00 solid; background:url(images/pen.gif) no-repeat 5px 3px; height:40px; text-indent:50px; line-height:40px; color:#464646; font-size:12px;}
.fb_nr {width:100%; margin:0 auto; margin-top:10px; line-height:22px; font-size:12px; color:#464646}
.fb_nr span {color:#FF0000;}
.fb_nr select {color:464646; font-size:12px;}
.fb_nr Div {margin-top:10px; height:30px;}
.fb_nr Div input {font-size:12px; line-height:18px;}
.inputtttt {border:1px #DEA303 solid; height:20px; color:#464646; font-size:12px; background:url(images/bottom_bg.jpg) repeat-x left top;}
.lb {background:#FFCD7F; color:#464646; font-weight:bold; text-align:center; height:30px; line-height:30px;}
.lb1 {border-bottom:1px #000000 dashed; height:28px;}
.lb1 td {border-bottom:1px #ccc dashed; background:#eefefe}
.fy1 {width:90%; margin:0 auto; margin-top:8px; background:#F8F8F8; font-size:12px; height:30px; line-height:28px; text-indent:10px;}
.fy1 span {color:#FF0000; font-weight:bold;}
.fy1 a {color:#464646; text-decoration:none;}
.fy1 a:hover {color:#FF0000; text-decoration:underline;}
</style>
	<script  type="text/javascript"  language="javascript">
   
  var pageObj;
   function topage(pageObj)
   {
      
     var formObj=document.getElementById('searchForm123');
     var page=document.getElementById('toPage').value
     
      var toPageLink=document.getElementById('toPageLinkpage').value;

     
     
      if(page!=null&&page!='')
     {

       if(!isNotNumReg(page))
       {
         var link=toPageLink+'&page='+page;
         window.location=encodeURI(link);
       }
        else
       {
         alert('您输入的页码只能是数字!');
         return false;
       }
     }
     else
     {
        alert("页码不能为空!");
      }
      
      
   }
   
   
   				function isNotNumReg(s)
			{
				var temp="0123456789";
				for( j=0;j<s.length; j++ ) 
				{	
					var ch=s.charAt(j);
					if(temp.indexOf(ch) == -1)
					{
						return true;
					}
				}
				return false;
			}

   				//跳转到编辑页面
   				function _toEdit(id){
   	   				var toPageLinkstr = document.getElementById('toPageLinkstr').value;
   	   				window.location.href="/admin/autoPlay.do?action=toUpdate&id="+id+'&backUrl='+toPageLinkstr;
   	   				return true;
   	   			}

   			//跳转到删除页面
   				function _toDel(id){
   					var toPageLinkstr = document.getElementById('toPageLinkstr').value;
   					window.location.href="/admin/autoPlay.do?action=del&id="+id+'&backUrl='+toPageLinkstr;
   	   				return true;
   	   			}
</script>
  </head>
  
  <body>
   <div class="vb_wid">自动播放新闻管理</div>
   
   <div class="fb_search">
   <h1>自动播放新闻搜索</h1>
   <div class="fb_s_a1">搜索内容：
    <html:form action="/admin/autoPlay.do?action=search" method="post">
     <label>
          <input type="text" id="keyWord" name="keyWord" />
     </label>
  <label>
    <html:button onclick="javascript:search();void 0;" property="button" value="提交"/>
    <a href="/admin/autoPlay.do?action=toAdd">添加</a>
     </label>
     </html:form>
        </div>
   <div class="fb_s_a2"></div>
</div>
<div class="fb_nr">
 
      <logic:present name="autoPlayList">
	<logic:notEmpty name="autoPlayList">
 
  	<form action="/admin/autoPlay.do?action=search&page=${curPage}&pageSize=${pageSize}" name="theForm1" method="post" id="theForm1">
  	<input type="hidden" id="toPageLinkstr"  value="/admin/autoPlay.do?action=search&page=${curPage}&pageSize=${pageSize}&keyWord=${keyword}" />
  	
  	
  <table width="100%" border="1" cellspacing="1" style="font-size:12px">
    <tr class="lb">
      <td width="4%">ID</td>
      <td width="20%">标题</td>
      <td width="8%">链接</td>
       <td width="8%">状态</td>
        <td width="8%">显示页面</td>
      <td width="10%">修改时间</td>
      <td width="8%">管理</td>
    </tr>

	<logic:iterate id="list" name="autoPlayList">
      <tr class="lb1">
      
        <td align="center"><font color="red"><b>${list.id}</b></font></td>
         <td align="center"><c:set var="titlestr3" value="${list.title}"></c:set>
         ${fn:substring(titlestr3,0,14)}</td>
        
        <td align="center" width="300px;">   
          <c:set var="link" value="${list.link}"></c:set>
         ${fn:substring(link,0,200)}
        </td>

          
        <td align="center">
        <c:if test="${list.status==-1}">已删除</c:if>
        <c:if test="${list.status==0}">正常</c:if>
        </td>
          
        <td align="center">
         ${list.type}
       </td>
       
        <td align="center">
        <c:set var="createDatetime" value="${list.gmtModified}"></c:set>
          ${fn:substring(createDatetime,0,19)}
        </td>
        
        <td align="center">
           <a href="javascript:void(0);" onclick="_toEdit('${list.id}');return false;" >[编辑]</a>
           <a href="javascript:void(0);" onclick="_toDel('${list.id}');return false;" >[删除]</a>
        
        </td>
          
        </tr>
      
      	</logic:iterate>
     </table>
     </form>
     
     </logic:notEmpty>
     </logic:present>
     
    

   <h1><img src="image/qqddc_shop1.gif" width="720" height="8" /></h1>
</div>
	

  </body>
</html:html>










